Skip to content

fix: inherit viewport dimensions in recording context#1208

Open
jin-2-kakaoent wants to merge 4 commits intovercel-labs:mainfrom
hyunjinee:fix/recording-viewport-inheritance
Open

fix: inherit viewport dimensions in recording context#1208
jin-2-kakaoent wants to merge 4 commits intovercel-labs:mainfrom
hyunjinee:fix/recording-viewport-inheritance

Conversation

@jin-2-kakaoent
Copy link
Copy Markdown
Contributor

Summary

  • When record start creates a new browser context, it now re-applies the current viewport settings so the recording resolution matches what the user configured instead of falling back to the default 1280×720
  • Both set viewport and set device paths now store viewport state on DaemonState for re-application
  • Follows the same "store & re-apply to new context" pattern used by download_path and ignore_https_errors

Before / After

Configured viewport Before (recording resolution) After (recording resolution)
set viewport 1920 1080 1280×578 1920×1080
set viewport 800 600 1280×578 800×600
set device "iphone 16 pro" 1280×578 1206×2622

Test plan

  • Added e2e test e2e_recording_inherits_viewport — sets 800×600 viewport, starts recording, verifies window.innerWidth/innerHeight in the recording context
  • Manual testing with ffprobe across three resolutions (1920×1080, 800×600, iPhone 16 Pro)

Closes #1207

When `record start` creates a new browser context, it now re-applies the
current viewport settings (from `set viewport` or `set device`) so the
recording resolution matches what the user configured instead of falling
back to the default 1280×720.

Closes vercel-labs#1207
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 10, 2026

@hyunjinee is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow videos to be recorded at different resolutions besides 1280x578

2 participants